// 题目三 练习4
// app.js
const fp = require('lodash/fp')
const { Maybe, Container } = require('./support')

// let ex4 = function (n) {
//     if (n) {
//         return parseInt(n)
//     }
// }

let ex4 = function (n) {
    const functor = Maybe.of(n)
                         .map(parseInt)
    return functor._value
}
console.log(ex4('2')) // 2

